package com.company;

public class MyMThread extends Thread{
    private String title;
    public int num = 5;
    public MyMThread(String title) {
        this.title = title;
    }
    @Override
    public void run() {
        for(int x = 0; x < 10; x ++) {
            if (this.num > 0) {
                System.out.println(this.title + ": int x = " + (this.num --));
            }
        }
    }
}
